From dc8f50b150be1b7189114cf1305827f8c5b21f0e Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Tue, 1 May 2007 10:15:08 +0100 Subject: [PATCH] xend: Ensure bootable flag is set in internal xend config for tap devices. Original patch by: Jim Fehlig Signed-off-by: Keir Fraser --- tools/python/xen/xend/XendConfig.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 6ced067f7b..14e0444df8 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -988,19 +988,16 @@ class XendConfig(dict): if param not in target: target[param] = [] if dev_uuid not in target[param]: - if dev_type == 'vbd' and not target[param]: - # Compat hack -- this is the first disk, so mark it - # bootable. - dev_info['bootable'] = 1 + if dev_type == 'vbd': + # Compat hack -- mark first disk bootable + dev_info['bootable'] = int(not target[param]) target[param].append(dev_uuid) elif dev_type == 'tap': if 'vbd_refs' not in target: target['vbd_refs'] = [] if dev_uuid not in target['vbd_refs']: - if not target['vbd_refs']: - # Compat hack -- this is the first disk, so mark it - # bootable. - dev_info['bootable'] = 1 + # Compat hack -- mark first disk bootable + dev_info['bootable'] = int(not target['vbd_refs']) target['vbd_refs'].append(dev_uuid) elif dev_type == 'vfb': -- 2.30.2